Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.

Bug report and bugfix for problem with invalid characters in thrown exception#1

Closed
slavo2 wants to merge 3 commits intoklarna:masterfrom
slavo2:fix/invalid-character-in-exception
Closed

Bug report and bugfix for problem with invalid characters in thrown exception#1
slavo2 wants to merge 3 commits intoklarna:masterfrom
slavo2:fix/invalid-character-in-exception

Conversation

@slavo2
Copy link
Copy Markdown

@slavo2 slavo2 commented May 13, 2015

Bug description:

KlarnaException which can be attempted to be thrown at line of 3669 of Klarna.php might contain possibly invalid characters from incorrectly interpreted faultString().

Bug fix:

Converting the character encoding of the message before being used in constructing KlarnaException by adding and using method Klarna::fixMessageEncoding()

 - fix for problem with (possibly) invalid characters in thrown exception
@JoakimLofgren
Copy link
Copy Markdown
Contributor

Thanks for your PR, I will take a look at it.

Klarna.php Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private methods should be prefixed with an underscore.

slavo2 added 2 commits May 20, 2015 13:14
…oding() and updated:

support for intl, mbstring and iconv php extensions
fallback to ASCII using regular expression
possibility to specify input and output encoding as method arguments
@slavo2
Copy link
Copy Markdown
Author

slavo2 commented May 20, 2015

I have renamed and updated the private method (now:) Klarna::_fixMessageEncoding()

@JoakimLofgren JoakimLofgren self-assigned this May 25, 2015
@JoakimLofgren
Copy link
Copy Markdown
Contributor

We're working on getting this repo into composer. As soon as that is done, I'll look into getting your stuff merged.

@slavo2
Copy link
Copy Markdown
Author

slavo2 commented May 26, 2015

Hi Joakim

I have already made a composer package from your SDK
https://github.com/Subscribo/klarna-invoice-sdk-wrapped
feel free to use (anything from) it.

Slavo

@slavo2
Copy link
Copy Markdown
Author

slavo2 commented Jun 1, 2015

Alternative (and possibly better) solution provided in pull request #3

JoakimLofgren added a commit that referenced this pull request Jun 3, 2015
…o v4.0

* commit '4f6ce70b1ada0a7d3a4c6f880016fb4af77ea494': (21 commits)
  Remove unused exceptions
  Update doc comments
  Add composer script for references
  Update README with shields for composer
  Update license to Apache 2.0
  Update changelog
  Add composer script for zip package
  Fix pcStorage name to class name
  Bump version
  Fix codesniffer lint errors
  Deprecate checkoutHTML method
  Update author doc comment
  Update examples to use autoloader
  Install phpxmlrpc dependency via composer
  Enable class autoloading via composer
  Split out exceptions into separate files
  Rename filenames to match class names
  Move source files into src/ directory
  Move examples into docs/ folder
  Add a composer.json file
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants